package com.project.dao;

import com.project.entity.Major;

import java.util.List;

/**
 * @Author: TateBrown
 * @date: 2018/5/26 12:50
 * @param:
 * @return:
 */
public interface MajorMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Major record);

    int insertSelective(Major record);

    Major selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Major record);

    int updateByPrimaryKey(Major record);

    List<Major> selectByDepartmentId(Integer departmentId);

    /**
     * author: WheelChen
     * date: 2017/8/10
     * function: 检查专业是否已存在
     *
     * @param major
     * @return 0 - 不存在 大于0存在
     */
    int checkMajorIsExist(Major major);

    /**
     * author: WheelChen
     * date: 2017/11/2
     * function: 根据系id批量删除专业表
     *
     * @param departmentId 系id
     * @return
     */
    int deleteBatchByDepartmentId(Integer departmentId);

    /**
     * author: WheelChen
     * date: 2017/11/3
     * function: 根据学院id删除班级表
     *
     * @param schoolId 学院id
     * @return
     */
    int deleteBatchBySchoolId(Integer schoolId);
}
